﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Service;
using Model;

namespace Manager
{
    /// <summary>
    /// Sys_Role业务逻辑
    /// 创建人：Wilson
    /// 创建时间：2013-1-29  
    /// </summary>
    public class Sys_RoleManager
    {
        			
        #region##通过主键ID得到Sys_Role
        /// <summary>
        /// 功能：通过ID得到Sys_Role
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29   
        /// </summary>
        /// <param name="">主键ID</param>
        /// <returns></returns>
        public Sys_Role GetById(int roleid)
        {            
            using (Sys_RoleService ws = new Sys_RoleService())
			{
				return ws.GetById(roleid);
			}
        }
        #endregion
		
		#region##通过主键ID删除Sys_Role
        /// <summary>
        /// 功能：通过主键ID删除Sys_Role
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29   
        /// </summary>
        /// <param name="">主键ID</param>
        /// <returns></returns>
		public int DeleteById(int roleid)
		{
			using (Sys_RoleService ws = new Sys_RoleService())
			{
				return ws.DeleteById(roleid);
			}
		}
		#endregion			
		
        #region##添加Sys_Role
        /// <summary>
        /// 功能：添加Sys_Role
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public int Add(Sys_Role sys_role)
        {
            using (Sys_RoleService ws = new Sys_RoleService())
			{
				return ws.Add(sys_role);
			}
        }
        #endregion
		
		#region##得到Sys_Role集合
		/// <summary>
        /// 功能：得到Sys_Role集合
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29
        /// </summary>       
        /// <returns></returns>
		public IList<Sys_Role> GetList()
		{
		    using (Sys_RoleService ws = new Sys_RoleService())
			{
				return ws.GetList();
			}
		}
		#endregion
		
		#region##修改Sys_Role
        /// <summary>
        /// 功能：修改Sys_Role
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public int ModSys_Role(Sys_Role sys_role)
        {
            using (Sys_RoleService ws = new Sys_RoleService())
			{
				return ws.ModSys_Role(sys_role);
			}
        }
        #endregion
		
		#region##统计Sys_Role
		/// <summary>
        /// 修改Sys_Role
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
		public int SelectCount()
		{
			using (Sys_RoleService ws = new Sys_RoleService())
			{
				return ws.SelectCount();
			}
		}
        /// <summary>
        /// 修改Sys_Role
        /// 创建人：  Wilson 
        /// 创建时间：2013-1-29
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public int SelectCountById()
        {
            using (Sys_RoleService ws = new Sys_RoleService())
			{
				return ws.SelectCountById();
			}
        }
		#endregion
        #region##自定义Sys_Role
        #endregion
    }
}